var AttrDrawingSprite=cc.Sprite.extend({
	width:0,
	height:0,
	atk:10,
	def:10,
	spd:10,
	vit:10,
	skl:10,
	pte:10,
	ctor: function(width,height){
		this._super();

		this.width=width;
		this.height=height;
		this.setContentSize(new cc.Size(width,height));
		this.setAnchorPoint(cc.p(0.5,0.5));
	},
	update: function(dt){

	},
	setAttribute: function(atk,def,spd,vit,skl,pte){
		this.atk=atk;
		this.def=def;
		this.spd=spd;
		this.vit=vit;
		this.skl=skl;
		this.pte=pte;
	},
	draw: function(){
		// 每格的距离
		var base=this.width/2/10*0;
		var perLength=this.width/2/9;
		var centerPoint=cc.p(this.width/2,this.height/2);
		// 画一个圈
		cc.drawingUtil.setDrawColor4B(255,0,0,255);
		cc.drawingUtil.setLineWidth(5);
        // point atk
        var pointATK=new cc.p(centerPoint.x,centerPoint.y+this.atk*perLength+base);
        // point skl
        var pointSKL=new cc.p(centerPoint.x-Math.sin(Math.PI/180*60)*(this.skl*perLength+base),centerPoint.y+Math.cos(Math.PI/180*60)*(this.skl*perLength+base));
        // point vit
        var pointVIT=new cc.p(centerPoint.x-Math.sin(Math.PI/180*60)*(this.vit*perLength+base),centerPoint.y-Math.cos(Math.PI/180*60)*(this.vit*perLength+base));
        // point def
        var pointDEF=new cc.p(centerPoint.x,centerPoint.y-this.def*perLength-base);
        // point pte
        var pointPTE=new cc.p(centerPoint.x+Math.sin(Math.PI/180*60)*(this.pte*perLength+base),centerPoint.y-Math.cos(Math.PI/180*60)*(this.pte*perLength+base));
        // point spdy
        var pointSPD=new cc.p(centerPoint.x+Math.sin(Math.PI/180*60)*(this.spd*perLength+base),centerPoint.y+Math.cos(Math.PI/180*60)*(this.spd*perLength+base));
        cc.drawingUtil.drawPoly(new Array(pointATK,pointSKL,pointVIT,pointDEF,pointPTE,pointSPD),6,true,false);
	}

})